package com.zzl.car.service;

import com.zzl.car.entity.StoreInfo;
import com.zzl.car.mapper.ZzwStoreInfoMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ZzwStoreInfoService {

    @Autowired
    private ZzwStoreInfoMapper zzwStoreInfoMapper;

    private static final String redisKeyName = "StoreInfoCache";

    public StoreInfo getStoreInfo(){
        System.out.println("调用数据库");
        StoreInfo storeInfo = zzwStoreInfoMapper.getStoreInfo();
        return storeInfo;
    }

    public int modifyStoreInfo(StoreInfo s) {
        if(zzwStoreInfoMapper.modifyStoreInfo(s))
            return 1;
        else
            return 0;
    }

    public boolean modifyStoreImage(String image) {
        System.out.println("修改图片信息");
        if(zzwStoreInfoMapper.modifyStoreImage(image))
            return true;
            return false;
    }
}
